package com.hy.controller;
/**
 * @作用 拿到随机数据后台总数
 * @return
 */

import com.hy.service.impl.*;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
public class getTotalNumber {
    @Resource
    private SequenceServiceImpl sequenceService;
    @Resource
    private SequenceAdditionServiceImpl sequenceAdditionService;
    @Resource
    private SequenceDivisionServiceImpl sequenceDivisionService;
    @Resource
    private SequenceMultiplicationServiceImpl sequenceMultiplicationService;
    @Resource
    private SequenceSubtractionServiceImpl sequenceSubtractionService;

    /**
     * @作用 拿到随机数据后台总数
     */
    @GetMapping("/allNumber")
    public Integer all() {
        return sequenceService.count();
    }

    /**
     * @作用 拿到加法数据后台总数
     */
    @GetMapping("/getAdditionNumber")
    public Integer getAddition() {
        return sequenceAdditionService.count();
    }

    /**
     * @作用 拿到除法数据后台总数
     */
    @GetMapping("/getDivisionNumber")
    public Integer getDivision() {
        return sequenceDivisionService.count();
    }

    /**
     * @作用 拿到乘法数据后台总数
     */
    @GetMapping("/getMultiplicationNumber")
    public Integer getMultiplication() {
        return sequenceMultiplicationService.count();
    }

    /**
     * @作用 拿到减法数据后台总数
     */
    @GetMapping("/getSubtractionNumber")
    public Integer getSubtraction() {
        return sequenceSubtractionService.count();
    }
}
